<!DOCTYPE html>
<html>
<head>
  <title>Rating On Rails</title>
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"%>
  <script>
      var $jQuery = jQuery.noConflict();
      $jQuery(document).ready(function() {
          $jQuery("#lecturesTab").mouseenter(function() {
              $jQuery("#hoverContainer").show('fast', function(){});
              $jQuery(this).css("border-bottom-right-radius","0px");
          });
          $jQuery("#lecturesTab").mouseleave(function() {
              if (!$jQuery('#hoverContainer').is(':hover')) {
                  $jQuery("#lecturesTab").css("border-bottom-right-radius","20px 10px");
                  $jQuery("#hoverContainer").hide('fast', function(){});
              }
          });
          $jQuery("#hoverContainer").mouseleave(function() {
              if (!$jQuery('#lecturesTab').is(':hover')) {
                  $jQuery("#lecturesTab").css("border-bottom-right-radius","20px 10px");
                  $jQuery("#hoverContainer").hide('fast', function(){});
              }
          });
      });
  </script>
  <%= csrf_meta_tags %>	
</head>
<body class="page">
<% flash.each do |name, msg| %>
    <%= content_tag :div, msg, :id => "flash_#{name}" %>
<% end %>
	<div id="header">
	</div>
	<div id="logo">
		<div id="floatLogo">
		</div>
	</div>
	<div id="menuBar">
		<div class="menuElement" onclick="location.href='/home';"> START </div>
		<div class="menuElement" id="lecturesTab" onclick="location.href='/lectures';"> LECTURES </div>
		<div class="menuElement" onclick="location.href='/home/contact';"> CONTACT </div>
            <% if current_user %>
                <div class="menuElement" onclick="location.href='/log_out';"> LOG OUT </div>
                <% #link_to "LOG OUT", log_out_path %>
            <% else %>
                <div class="menuElement" onclick="location.href='/log_in';"> LOG IN </div>
                <% #link_to "LOG IN", log_in_path %>
            <% end %>
        <div class="menuElement" onclick="location.href='/users/new';"> REGISTER </div>
        <div class="menuElement" onclick="location.href='/users';">  USERS </div>
		<div id="hoverContainer">
			<div class="drop" onclick="location.href='/lectures';"> BROWSE </div>
			<div class="drop" onclick="location.href='/lectures/new';"> ADD </div>
            <div class="drop" id="last" onclick="location.href='/lectures';"> FIND </div>
		</div><!-- hoverContainer -->
	</div><!-- menuBar-->
	<div id="container">
		<div id="content">
			<%= yield %>
		</div><!-- content-->
	</div><!-- container-->
</body>
</html>